<?php

//fonction d'envoi de mail
function envoyer_mail($to, $sujet, $message)
{
	//variable adresses mail
	$from = 'mail@pitininja.net';
	$reply = 'mail@pitininja.net';
	
	//info d'envoi
	$header ='From: "PiTiNiNjA.NeT"<'.$from.'>'."\n"; 
	$header .='Reply-To: '.$reply.' '."\n"; 
	$header .='Content-Type: text/html; charset="UTF-8"'."\n"; 
	$header .='Content-Transfer-Encoding: 8bit'; 
	
	//mail
	$mail = '<html>';
	$mail .= 	'<head>';
	$mail .=			'<title>';
	$mail .=				$sujet;
	$mail .=			'</title>';
	$mail .=		'</head>';
	$mail .=		'<body>';
	$mail .=			$message;
	$mail .=		'</body>';
	$mail .=	'</html>';
	
	//envoi
	mail($to, $sujet, $mail, $header);
}

?>